home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / zc / tok.h < prev    next >
C/C++ Source or Header  |  1989-03-08  |  1KB  |  45 lines

  1. /* Copyright (c) 1988 by Sozobon, Limited.  Author: Johann Ruegg
  2.  *
  3.  * Permission is granted to anyone to use this software for any purpose
  4.  * on any computer system, and to redistribute it freely, with the
  5.  * following restrictions:
  6.  * 1) No charge may be made other than reasonable charges for reproduction.
  7.  * 2) Modified versions must be clearly marked as such.
  8.  * 3) The authors are not responsible for any harmful consequences
  9.  *    of using this software, even if they result from defects in it.
  10.  *
  11.  *    tok.h
  12.  *
  13.  *    establish token values
  14.  */
  15.  
  16. struct tok {
  17.     char    *name;
  18.     int    tnum;
  19.     long    ival;
  20.     double    fval;
  21.     char    prec;
  22.     int    flags;
  23. };
  24.  
  25. #include "flags.h"
  26. #include "bstok.h"
  27.  
  28. #define is_sclass(x)    (x >= K_EXTERN && x <= K_STATIC)
  29. #define is_tadj(x)    (x >= K_LONG && x <= K_UNSIGNED)
  30. #define is_btype(x)    (x >= K_INT && x <= K_VOID)
  31. #define is_tykw(x)    (x >= K_EXTERN && x <= K_STRUCT)
  32.  
  33. #define is_stkw(x)    (x >= K_GOTO && x <= K_ASM)
  34. #define is_brast(x)    (x >= K_GOTO && x <= K_CONTINUE)
  35. #define is_blkst(x)    (x >= K_IF && x <= K_SWITCH)
  36. #define is_lblst(x)    (x >= K_CASE && x <= K_DEFAULT)
  37.  
  38. #include "tytok.h"
  39. #include "sttok.h"
  40.  
  41. /* modifier seen flags */
  42. #define SAW_SHORT    1
  43. #define SAW_LONG    2
  44. #define SAW_UNS        4
  45.